package com.xbongbong.paas.print.manager.feign;

import com.xbongbong.paas.pojo.dto.FormDataGetDTO;
import com.xbongbong.paas.pojo.dto.PrintSubFromDataGetDTO;
import com.xbongbong.paas.print.pojo.dto.SubFormAttrDataDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author WuHB
 * @date 2022/11/16 18:39
 */
@FeignClient(name = "xbb-work-order-web", contextId = "workOrderPrintClient")
public interface WorkOrderPrintClient {

    /**
     * 获取回执单的服务项目打印模板字段
     *
     * @param formGetDto formGetDto
     * @param lang       lang
     * @return 打印模板字段
     */
    @RequestMapping(value = "/pro/v1/workOrderV2/receiptOrder/getReceiptFormAttrData", method = RequestMethod.POST)
    String getFormInfo(SubFormAttrDataDTO formGetDto, @RequestParam("lang") String lang);

    /**
     * 获取回执单的打印数据
     *
     * @param formGetDto formGetDto
     * @param lang       lang
     * @return 打印模板字段
     */
    @RequestMapping(value = "/pro/v1/workOrderV2/common/detail/get", method = RequestMethod.POST)
    String getFormData(FormDataGetDTO formGetDto, @RequestParam("lang") String lang);

    /**
     * 获取回执单的打印数据
     *
     * @param formGetDto formGetDto
     * @param lang       lang
     * @return 打印模板字段
     */
    @RequestMapping(value = "/pro/v1/workOrderV2/common/getPrintSubFromData", method = RequestMethod.POST)
    String getPrintSubFromData(PrintSubFromDataGetDTO formGetDto, @RequestParam("lang") String lang);
}
